package de.koller.million.render.szene;

import de.koller.million.render.RenderRoot;
import de.koller.million.render.obj.Floor;
import de.koller.million.render.obj.GlowHouse;
import de.koller.oceanFramework.tree.Child;
import de.koller.oceanFramework.tree.Mother;
import de.koller.oceanFramework.tree.Sea3X;
import java.util.Random;

public class Szene extends Sea3X {
	
	@Mother private RenderRoot rroot;

	private final static Random rnd = new Random();
	@Child public final Floor floor = new Floor();

	@Override
	protected void init() {
		super.init();
		
		rroot.camera.getPosition().set( 9.48, 6.18, 10.06 );
		rroot.camera.setRotX( 17.90f );
		rroot.camera.setRotY( -49.40f );
		
		for( int x = -8; x < 10; x += 2 )
			for( int y = -8; y < 10; y += 2 ) {
				float h = rnd.nextFloat()*4 + 1;
				GlowHouse gh = new GlowHouse( x, y, h );
				this.addChild( gh );
			}
	}
	
}
